package com.taskpad.ui;

import java.awt.Color;

import com.taskpad.input.InputManager;


/**
 * 
 * @author Jun
 *
 * This is designed to help Taining debug.
 * Cannot be used as release.
 * This is a stub and not the original GuiManager! :D 
 *
 */
public class GuiManager {
//	private static final String NEWLINE = "\n";
	private static final String MESSAGE_START_REMINDER = "HELLO! Reminder: ";
//	private static InputFrame _inputFrame;
//	private static OutputFrame _outputFrame;

	//not designed to be instantiated
	private GuiManager(){
	}

	//by default 
	public static void initialGuiManager() {
		//_inputFrame = new InputFrame();
		//_outputFrame = new FlexiFontOutputFrame();
	}

	/* deprecated
	public static void initialGuiManager(InputFrame inputFrame,
		OutputFrame outputFrame) {
		setInputFrame(inputFrame);
		setOutputFrame(outputFrame);
	}
	 */

	public static void callExit(){
		closeAllWindows();

	}

	private static void closeAllWindows() {
		//_inputFrame.close();
		//_outputFrame.close();
		
		/*
		 * below function is to help Taining debug
		 */
		System.exit(0);
	}

	public static void callOutput(String out){
		//_outputFrame.addLine(out + NEWLINE);
		System.out.println(out);
	}
	
	
	/**
	 * 
	 * @param out
	 * @param c
	 * @param isBold
	 * 
	 * Taining if you want to use this function,
	 * just call, it should not have any bug. 
	 * At here I will just print err message
	 */
	public static void showSelfDefinedMessage(String out, Color c, boolean isBold){
		//_outputFrame.addSelfDefinedLine(out + NEWLINE, c, isBold);
		System.err.println(out);
	}

	public static void startRemindingUser(){
		//remindUser(MESSAGE_START_REMINDER);
		System.out.println(MESSAGE_START_REMINDER);
	}
	
	public static void remindUser(String out){
		//_outputFrame.addReminder(out + NEWLINE);
		System.out.println(out);
	}

	public static void passInput(String in){
		InputManager.receiveFromGui(in);
	}

	/* deprecated
	private static void setInputFrame(InputFrame _inputFrame) {
		GuiManager._inputFrame = _inputFrame;
	}

	private static void setOutputFrame(OutputFrame _outputFrame) {
		GuiManager._outputFrame = _outputFrame;
	}
	 */

	//just call it if you want, although it won't have any effect
	//during your debugging
	public static void clearOutput(){
		//_outputFrame.clearOutputBox();
	}
}
